package com.abu.orderms.controller;

import com.abu.orderms.config.LoginInterceptor;
import com.abu.orderms.pojo.UserInfo;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("order")
public class OrderController {

    @GetMapping("get")
    public UserInfo addOrder() {
        UserInfo userInfo = LoginInterceptor.getUserInfo();
        if (userInfo != null) {
            return userInfo;
        }
        return null;
    }
}
